import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  { // 登录
    path: '/login',
    component: () => import('@/views/login'),
    hidden: true
  },

  { // 错误页面
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  { // 用户管理
    path: '/',
    component: Layout,
    redirect: '/user',
    meta: { title: '用户管理', icon: 'dashboard' },
    children: [
      {
        path: 'user',
        name: 'user',
        component: () => import('@/views/dashboard/user'),
        meta: { title: '用户管理', icon: 'dashboard' }
      },
      {
        path: 'expertstalent',
        name: 'Expertstalent',
        component: () => import('@/views/dashboard/expertstalent'),
        meta: { title: '专家人才管理', icon: 'dashboard' }
      },
      {
        path: 'monit',
        name: 'Monit',
        component: () => import('@/views/dashboard/monit'),
        meta: { title: '投放监播管理', icon: 'dashboard' },
      },
      { // 活动培训
        path: '/train',
        component: Layout,
        redirect: '/train/activitiesList',
        name: 'Train',
        meta: { title: '活动培训', icon: 'el-icon-s-help' },
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
